package com.bfly.mall.wechat.enums;

/**
 * 公众号菜单类型
 * @author 长沙商脉科技有限公司
 * @date 2021/1/6 15:36
 */
public enum WeChatMpMenuCategoryEnum {
    MAIN_MENU(0,"一级菜单","",""),

    LINK_WEB_MENU(1,"跳转网页","view",""),

    OPEN_MINI_PRO_MENU(2, "打开小程序","miniprogram",""),

    SEND_TEXT_MENU(3, "发送文本","click","send_user_text"),
    SEND_PIC_MENU(4,"发送图片","click","send_user_pic"),
    SEND_NEWS_MENU(5,"发送图文","click","send_user_text_pic"),
    SEND_VOICE_MENU(6,"发送语音","click","send_user_voice"),
    SEND_VIDEO_MENU(7,"发送视频","click","send_user_video"),

    SCAN_CODE_PUSH_MENU(9,"扫码上传","scancode_push","scan_code_push"),
    SCAN_CODE_WAIT_MENU(10,"扫码下发","scancode_waitmsg","scan_code_wait"),
    TAKE_PHONE_MENU(11,"系统相机拍照","pic_sysphoto","take_phone"),
    TAKE_PHONE_ALBUM_MENU(12,"系统相机拍照或选择相册","pic_photo_or_album","take_phone_album"),
    WECHAT_ALBUM_MENU(13,"弹出微信相册","pic_weixin","wechat_album"),
    LOCATION_MENU(14,"地理位置选择","location_select","choose_location");

    private int id;
    private String name;
    private String type;
    private String key;

    WeChatMpMenuCategoryEnum(int id, String name,String type,String key) {
        this.id = id;
        this.name = name;
        this.type=type;
        this.key=key;
    }

    public static WeChatMpMenuCategoryEnum getCategory(int id) {
        for (WeChatMpMenuCategoryEnum status : WeChatMpMenuCategoryEnum.values()) {
            if (id ==status.getId()) {
                return status;
            }
        }
        return null;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
